<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "t_base_major_directory".
 *
 * @property string $id
 * @property string $uuid
 * @property string $pid
 * @property int $code
 * @property string $name
 * @property int $del_flag 删除标示
 * @property string $create_by 创建人
 * @property string $create_time 创建时间
 * @property string $update_by 更新人
 * @property string $update_time 更新时间
 * @property string $leaf
 * @property string $pinyin
 */
class TBaseMajorDirectory extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 't_base_major_directory';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['id'], 'required'],
            [['code', 'del_flag'], 'integer'],
            [['create_time', 'update_time'], 'safe'],
            [['id', 'uuid', 'pid', 'create_by', 'update_by'], 'string', 'max' => 36],
            [['name', 'leaf', 'pinyin'], 'string', 'max' => 255],
            [['id'], 'unique'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'uuid' => 'Uuid',
            'pid' => 'Pid',
            'code' => 'Code',
            'name' => 'Name',
            'del_flag' => 'Del Flag',
            'create_by' => 'Create By',
            'create_time' => 'Create Time',
            'update_by' => 'Update By',
            'update_time' => 'Update Time',
            'leaf' => 'Leaf',
            'pinyin' => 'Pinyin',
        ];
    }
}
